<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;

class Controller extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;

    /**
     * Instructions:
     * Author: Vijay  <1937832819@qq.com>
     * Time: 2019/2/27 10:24
     * @param $data
     * @param int $choice
     */
    public static function pr($data, $choice = 1)
    {
        if ($choice == 1) {
            echo "<pre>";
            print_r($data);
            echo "</pre>";
        } elseif ($choice == 2) {
            dump($data, true, null);
        } else {
            echo "<pre>";
            var_export($data);
            echo "</pre>";
        }
        exit;
    }
}
